package com.zzs.team.DAO;

import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface LocationDao {

    @Select("select provinceName from province_info")
    List<String> findProvinces();

    @Select("select cityName from city_info where provinceID=(select provinceID from province_info where provinceName= #{provinceName})")
    List<String> findCitiesByProvince(String provinceName);

    @Select("select schoolName from school_info where cityID=(select cityID from city_info where cityName= #{cityName})")
    List<String> findSchoolsByCity(String cityName);

}
